package io.wdb.modules.generator.generator.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Mapper;

import io.wdb.common.utils.Query;
import io.wdb.modules.generator.generator.entity.MetadataResponse;
import io.wdb.modules.generator.generator.entity.OrderTransEntity;
import io.wdb.modules.generator.generator.entity.customer.OrderTransEntityCustomer;
import io.wdb.modules.generator.generator.entity.statistics.BookShelfEntityBorrow;
import io.wdb.modules.generator.generator.entity.statistics.BorrowStatistics;
import io.wdb.modules.generator.generator.entity.web.DaysQueryRequest;
import io.wdb.modules.manager.sys.dao.BaseDao;


/**
 * 用户借还流水表
 * 
 * @author wdb
 * @email admin@wdb007.com
 * @date 2017-11-30 15:15:37
 */
@Mapper
public interface OrderTransDao extends BaseDao<OrderTransEntity> {
	public int getBookCountByOrderId(String orderId);

	public OrderTransEntity queryBorrowBook(String rfidCode);

	public List<OrderTransEntityCustomer> queryListBorrow(Query query);

	public List<OrderTransEntityCustomer> queryCurrentBorrowBooks(Query query);

	public List<OrderTransEntityCustomer> queryBorrowCount(Query query);

	public List<OrderTransEntityCustomer> queryBorrowStatistics(String rfidCode);

	public List<MetadataResponse> newBorrowBooks(Map<String, Object> params);

	public List<MetadataResponse> newUserBorrows(Map<String, Object> params);

	@Deprecated
	public String totalBorrowedBooks();
	@Deprecated
	public String totalBorrowedUser();

	public String daysTotalBorrowBooks(DaysQueryRequest daysQueryRequest);
	@Deprecated
	public String currentDayBorrowBooks(DaysQueryRequest daysQueryRequest);

	public String countBorrowBooks(DaysQueryRequest daysQueryRequest);

	public String curretBorrowBooks(DaysQueryRequest daysQueryRequest);

	public String daysTotalBorrowBooksIsbn(DaysQueryRequest daysQueryRequest);

	public String daysTotalBorrowUsers(DaysQueryRequest daysQueryRequest);
	
	public List<BookShelfEntityBorrow> daysEachBookBorrows(DaysQueryRequest daysQueryRequest);

	public BorrowStatistics daysBorrowBooks(DaysQueryRequest daysQueryRequest);

	public BorrowStatistics daysBorrowUsers(DaysQueryRequest daysQueryRequest);
	
	public BorrowStatistics daysBorrowTimes(DaysQueryRequest daysQueryRequest);

	public BorrowStatistics daysCurrentBorrowBooks(DaysQueryRequest daysQueryRequest);

	public BorrowStatistics daysReturnBooks(DaysQueryRequest daysQueryRequest);

	public List<BorrowStatistics> daysLabelTotalBorrowBooks(DaysQueryRequest daysQueryRequest);
}
